<template>
	<view>
		<view class="detail" v-if="data">
			<view class="name">{{data.form.name}}</view>
			<view class="price">{{data.data ? (data.data/10000).toFixed(1) + '万' : '暂无报价'}}</view>
			<view class="u-flex text" v-if="data.data">
				<view>房屋均价 {{(data.data / data.form.area).toFixed(0)}}元/平</view>
				<view>|</view>
				<view>小区均价 {{(data.data / data.form.area).toFixed(0)}}元/平</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				data:''
			}
		},
		onLoad({data}) {
			this.data = JSON.parse(decodeURIComponent(data))
		}
	}
</script>

<style lang="scss">
	.detail{background: linear-gradient(145deg, #ff5d5d 25%, #ff5353 0, #ff4747 50%,#ff3737 0,#ff3a33 75%,#ff4747 0,#ff3737 100%);
		margin: 30rpx 30rpx 0;padding: 40rpx;border-radius: 30rpx;color: #fff;
		.name{text-align: center;font-size: 30rpx;}
		.price{font-weight: bold;font-size: 40rpx;padding: 20rpx 0 60rpx;text-align: center;}
		.text{justify-content: space-between;}
	}
</style>
